package com.cqndt.disaster.device.service.impl;

import java.util.Map;
import org.springframework.stereotype.Service;
import com.cqndt.disaster.device.dao.AppTabTwoRoundMapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Autowired;
import com.cqndt.disaster.device.service.AppTabTwoRoundService;

/**
 * Created By marc
 * Date: 2019/4/12  15:43
 * Description:获取全景图
 */
@Service
public class AppTabTwoRoundServiceImpl implements AppTabTwoRoundService {
    @Autowired
    private AppTabTwoRoundMapper tabTwoRoundMapper;
    @Value("${file-ip}")
    private String fileIp;

    @Override
    public Map<String,Object> selectByProjectId(Integer projectId, String modelType) {
        Map<String,Object> round = tabTwoRoundMapper.selectByProjectId(projectId,modelType);
        if(null!=round && null != round.get("Panorama")){
            round.put("Panorama",fileIp+"/"+round.get("Panorama").toString());
        }
        return round;
    }
}
